<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('名字')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text"value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('描述')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sub_title" data-rule="required" class="form-control" name="row[sub_title]" type="text" value="{$row.sub_title|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('分类')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-type_id" data-rule="required" data-source="type/index" class="form-control selectpage" name="row[type_id]" type="text" value="{$row.type_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('品牌')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-brand_id" data-rule="required"  data-source="brand/index"  data-field="brand" class="form-control selectpage" name="row[brand_id]" type="text"  value="{$row.brand_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('规格')}:</label>
        <div class="col-xs-6 col-sm-4">
            如需修改规格，请在规格管理中修改
            <input id="c-guige_id" data-rule="required" data-source="guige/index"   data-field="guige" class="form-control selectpage" name="row[guige_id]" type="text" value="{$row.guige_id|htmlentities}" disabled/>
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" data-rule="required" class="form-control" size="50" name="row[images]" type="text" value="{$row.images|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-images"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Money')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-money" data-rule="required" class="form-control" name="row[money]" type="number" value="{$row.money|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('推荐')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input  id="c-commend" name="row[commend]" type="hidden" value="{$row.commend}">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-commend" data-yes="1" data-no="0" >
            <i class="fa fa-toggle-on text-success {eq name="$row.commend" value="0"}fa-flip-horizontal text-gray{/eq} fa-2x"></i>
            </a>
          
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('上架')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input  id="c-status" name="row[status]" type="hidden" value="{$row.status}">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-status" data-yes="1" data-no="0" >
            <i class="fa fa-toggle-on text-success {eq name="$row.status" value="0"}fa-flip-horizontal text-gray{/eq} fa-2x"></i>
            </a>

          

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-num" data-rule="required" class="form-control" name="row[num]" type="number" value="{$row.num|htmlentities}">
        </div>
    </div>
    <div class="form-group" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-create_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:$row.create_time?datetime($row.create_time):''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">活动商品:</label>
        <div class="col-xs-12 col-sm-8">
            <input  id="c-active" name="row[active]" type="hidden" value="{$row.active}">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-active" data-yes="1" data-no="0" >
            <i class="fa fa-toggle-on text-success {eq name="$row.active" value="0"}fa-flip-horizontal text-gray{/eq} fa-2x"></i>
            </a>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Active_money')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-active_money" data-rule="required" class="form-control" name="row[active_money]" type="number" value="{$row.active_money|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('配送费用')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-delivery_fee" class="form-control" name="row[delivery_fee]" type="number" value="{$row.delivery_fee|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('详情')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-detail" data-rule="required" class="form-control editor" name="row[detail]" type="text" >{$row.detail|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
